package sanshi.contect.command;

public class InsertCommand extends Command{

    Content content;
    String strInsert = "sanshi study java";

    public InsertCommand(Content content) {
        this.content = content;
    }

    @Override
    public Command doit() {
        content.msg = content.msg + strInsert;
        return this;
    }

    @Override
    public Command undo() {
        content.msg = content.msg.substring(0, content.msg.length() - strInsert.length());
        return this;
    }
}
